home *** CD-ROM | disk | FTP | other *** search
/ Network CD 1 / Network CD.iso / converters / pbmplus / doc / libpbm.doc < prev    next >
Encoding:
Text File  |  1990-06-20  |  3.1 KB  |  199 lines

  1.  
  2.  
  3.  
  4. pbm(3)                      PBM Plus                       pbm(3)
  5.  
  6.  
  7.  
  8. NAME
  9.      pbm - functions to support portable bitmap programs
  10.  
  11. SYNOPSIS
  12.      #include <pbm.h>
  13.      cc ... libpbm.a
  14.  
  15.  
  16. DESCRIPTION
  17.      TYPES AND CONSTANTS
  18.  
  19.      typedef unsigned char bit;
  20.      #define PBM_WHITE 0
  21.      #define PBM_BLACK 1
  22.  
  23.      Each _b_i_t should contain only the values of _w_h_i_t_e or _b_l_a_c_k.
  24.  
  25.      PBM MEMORY MANAGEMENT
  26.  
  27.      bit **pbm_allocarray(int cols, int rows)
  28.  
  29.      Allocate an array of bits.
  30.  
  31.      bit *pbm_allocrow( int cols )
  32.  
  33.      Allocate a row of the given number of bits.
  34.  
  35.      void pbm_freearray( bitrow, rows )
  36.  
  37.      Free the array allocated with _p_b_m__a_l_l_o_c_a_r_r_a_y() containing
  38.      the given number of rows.
  39.  
  40.      pbm_freerow( bitrow )
  41.  
  42.      Free a row of bits.
  43.  
  44.      READING PBM FILES
  45.  
  46.      void
  47.      pbm_readpbminit( file, colsP, rowsP, formatP )
  48.      FILE *file;
  49.      int *colsP, *rowsP, *formatP;
  50.  
  51.      Read the header from a pbm file, filling in the rows, cols
  52.      and format variables.
  53.  
  54.      void
  55.      pbm_readpbmrow( file, bitrow, cols, format )
  56.      FILE *file;
  57.      bit *bitrow;
  58.      int cols, format;
  59.  
  60.  
  61.  
  62.  
  63. Printed 5/25/90                                                 1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. pbm(3)                      PBM Plus                       pbm(3)
  71.  
  72.  
  73.  
  74.      Read a row of bits into the bitrow array.  Format and cols
  75.      were filled in by _p_b_m__r_e_a_d_p_b_m_i_n_i_t().
  76.  
  77.      bit **
  78.      pbm_readpbm( file, colsP, rowsP )
  79.      FILE *file;
  80.      int *colsP, *rowsP;
  81.  
  82.      Read an entire bitmap file into memory, returning the allo-
  83.      cated array and filling in the rows and cols variables.
  84.      This function combines _p_b_m__r_e_a_d_p_b_m_i_n_i_t(), _p_b_m__a_l_l_o_c_a_r_r_a_y()
  85.      and _p_b_m__r_e_a_d_p_b_m_r_o_w().
  86.  
  87.      WRITING PBM FILES
  88.  
  89.      void
  90.      pbm_writepbminit( file, cols, rows )
  91.      FILE *file;
  92.      int cols, rows;
  93.  
  94.      Write the header for a portable bitmap file.
  95.  
  96.      void
  97.      pbm_writepbmrow( file, bitrow, cols )
  98.      FILE *file;
  99.      bit *bitrow;
  100.      int cols;
  101.  
  102.      Write a row from a portable bitmap.
  103.  
  104.      void
  105.      pbm_writepbm( file, bits, cols, rows )
  106.      FILE *file;
  107.      bit **bits;
  108.      int cols, rows;
  109.  
  110.      Write the header and all data for a portable bitmap.  This
  111.      function combines _p_b_m__w_r_i_t_e_p_b_m_i_n_i_t() and _p_b_m__w_r_i_t_e_p_b_m_r_o_w().
  112.  
  113. SEE ALSO
  114.      pgm(3), ppm(3)
  115.  
  116. AUTHOR
  117.      Manual by Tony Hansen.
  118.  
  119.      Copyright (C) 1989 by Jef Poskanzer.
  120.  
  121.      Permission to use, copy, modify, and distribute this
  122.      software and its documentation for any purpose and without
  123.      fee is hereby granted, provided that the above copyright
  124.      notice appear in all copies and that both that copyright
  125.      notice and this permission notice appear in supporting
  126.  
  127.  
  128.  
  129. Printed 5/25/90                                                 2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. pbm(3)                      PBM Plus                       pbm(3)
  137.  
  138.  
  139.  
  140.      documentation.  This software is provided "as is" without
  141.      express or implied warranty.
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195. Printed 5/25/90                                                 3
  196.  
  197.  
  198.  
  199.